package com.cml.rpc.server;

import com.cml.rpc.publicinterface.BlogService;
import com.cml.rpc.publicpojo.Blog;

import java.util.UUID;

/**
 * @author cml
 * @create 2021/7/20 17:38
 */
public class BlogServiceImpl implements BlogService {
    @Override
    public Blog getBlogById(Integer id) {
        Blog blog = Blog.builder().id(id).title(UUID.randomUUID().toString().substring(0, 4)).content("我是博客").build();
        return blog;
    }

    @Override
    public Integer insertBlog(Blog blog) {
        // 插入博客
        return 1;
    }
}
